//
//  BaseNavigationViewController.m
//  HTP
//
//  Created by admin on 15/10/26.
//  Copyright © 2015年 nit. All rights reserved.
//

#import "BaseNavigationViewController.h"
#import "RootViewController.h"
@interface BaseNavigationViewController ()<UINavigationControllerDelegate>

@end

@implementation BaseNavigationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.delegate = self;
    // Do any additional setup after loading the view.
}
/**
 *  导航栏 show ViewController
 *
 *  @param navigationController
 *  @param viewController
 *  @param animated
 */
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
    if ([[self.viewControllers objectAtIndex:0] isKindOfClass:[RootViewController class]]) {
        if ([viewController respondsToSelector:@selector(viewWillAppear:)]) {
            //自定义左边baritem右划退出失效解决
            if ([viewController.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
                viewController.navigationController.interactivePopGestureRecognizer.delegate = nil;
            }
        }
    }
    
}
-(void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
   
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
